home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
201-225
/
disk_222
/
plplot
/
src
/
source.zoo
/
plside3.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-05-15
|
3KB
|
105 lines
/* This routine draws sides around the front of the 3d plot so that */
/* it does not appear to float */
#include "plplot.h"
void plside3(x,y,z,nx,ny,ly,opt)
int nx, ny, ly, opt;
float *x, *y, *z;
{
int i;
float cxx, cxy, cyx, cyy, cyz;
float xmin, ymin, zmin, xmax, ymax, zmax, zscale;
float tx, ty, ux, uy;
gw3wc(&cxx,&cxy,&cyx,&cyy,&cyz);
gdom(&xmin,&xmax,&ymin,&ymax);
grange(&zscale,&zmin,&zmax);
if (cxx >= 0.0 && cxy <= 0.0) {
/* Get x, y coordinates of legs and plot */
if (opt != 1) {
for (i=0; i<nx; i++) {
tx = w3wcx(*(x+i),*y,zmin);
ty = w3wcy(*(x+i),*y,zmin);
ux = w3wcx(*(x+i),*y,*(z+i*ly));
uy = w3wcy(*(x+i),*y,*(z+i*ly));
pljoin(tx,ty,ux,uy);
}
}
if (opt != 2) {
for (i=0; i<ny; i++) {
tx = w3wcx(*x,*(y+i),zmin);
ty = w3wcy(*x,*(y+i),zmin);
ux = w3wcx(*x,*(y+i),*(z+i));
uy = w3wcy(*x,*(y+i),*(z+i));
pljoin(tx,ty,ux,uy);
}
}
}
else if(cxx <= 0.0 && cxy <= 0.0) {
if (opt != 1 ) {
for (i=0; i<nx; i++) {
tx = w3wcx(*(x+i),*(y+ny-1),zmin);
ty = w3wcy(*(x+i),*(y+ny-1),zmin);
ux = w3wcx(*(x+i),*(y+ny-1),*(z+i*ly+ny-1));
uy = w3wcy(*(x+i),*(y+ny-1),*(z+i*ly+ny-1));
pljoin(tx,ty,ux,uy);
}
}
if (opt != 2) {
for (i=0; i<ny; i++) {
tx = w3wcx(*x,*(y+i),zmin);
ty = w3wcy(*x,*(y+i),zmin);
ux = w3wcx(*x,*(y+i),*(z+i));
uy = w3wcy(*x,*(y+i),*(z+i));
pljoin(tx,ty,ux,uy);
}
}
}
else if(cxx <= 0.0 && cxy >= 0.0) {
if (opt != 1) {
for (i=0; i<nx; i++) {
tx = w3wcx(*(x+i),*(y+ny-1),zmin);
ty = w3wcy(*(x+i),*(y+ny-1),zmin);
ux = w3wcx(*(x+i),*(y+ny-1),*(z+i*ly+ny-1));
uy = w3wcy(*(x+i),*(y+ny-1),*(z+i*ly+ny-1));
pljoin(tx,ty,ux,uy);
}
}
if (opt != 2) {
for (i=0; i<ny; i++) {
tx = w3wcx(*(x+nx-1),*(y+i),zmin);
ty = w3wcy(*(x+nx-1),*(y+i),zmin);
ux = w3wcx(*(x+nx-1),*(y+i),*(z+(nx-1)*ly+i));
uy = w3wcy(*(x+nx-1),*(y+i),*(z+(nx-1)*ly+i));
pljoin(tx,ty,ux,uy);
}
}
}
else if(cxx >= 0.0 && cxy >= 0.0) {
if (opt != 1) {
for (i=0; i<nx; i++) {
tx = w3wcx(*(x+i),*y,zmin);
ty = w3wcy(*(x+i),*y,zmin);
ux = w3wcx(*(x+i),*y,*(z+i*ly));
uy = w3wcy(*(x+i),*y,*(z+i*ly));
pljoin(tx,ty,ux,uy);
}
}
if (opt != 2) {
for (i=0; i<ny; i++) {
tx = w3wcx(*(x+nx-1),*(y+i),zmin);
ty = w3wcy(*(x+nx-1),*(y+i),zmin);
ux = w3wcx(*(x+nx-1),*(y+i),*(z+(nx-1)*ly+i));
uy = w3wcy(*(x+nx-1),*(y+i),*(z+(nx-1)*ly+i));
pljoin(tx,ty,ux,uy);
}
}
}
}